package com.fduss.mazegame.core.unit;

import com.fduss.mazegame.core.maze.Maze;
import com.fduss.mazegame.core.unit.feature.HasEvent;
import com.fduss.mazegame.core.unit.feature.Icon;

/**
 * @Author duocai wu
 * @Date 2017/9/27
 * @Time 20:12
 */
public class Monster extends Mob {
    public Monster(Place place) {
        super(place);
    }

    @Override
    public Icon getIcon() {
        return Icon.MONSTER;
    }

    @Override
    public void handleEvent(Maze maze, HasEvent ob) {
        if (ob instanceof Hero && this.isAlive()) {
            ((Hero) ob).setAlive(false);
        }
    }
}
